#ifndef PIDPARAMETERSET_H
#define PIDPARAMETERSET_H

#include <QMainWindow>
#include "usermysqls.h"
#include <QSqlTableModel>
#include <QTableView>
#include <QHeaderView>
#include <QMessageBox>
#include <QVBoxLayout>
namespace Ui {
class PidParameterSet;
}

class PidParameterSet : public QMainWindow
{
    Q_OBJECT

public:
    explicit PidParameterSet(QWidget *parent = nullptr);
    static PidParameterSet* instance();
    ~PidParameterSet();
void displayPidParameterSetTable();

private slots:
    void on_pushButtonExit_clicked();

    void on_pushButtonConfirm_clicked();

    void on_pushButtonRefresh_clicked();
    void on_comboBoxPIDControlName_currentIndexChanged(int index);

    void on_comboBoxPIDControlName_highlighted(int index);

private:
    void initSpinboxRange();
    void setPidParameters(int id,int SetpointValue,int OutputLimitsUpper,int OutputLimitsLower,int Kp,int Ti,int Td,int Deadband,int SamplingTime);

private:
    Ui::PidParameterSet *ui;
     QSqlTableModel *model;
};

#endif // PIDPARAMETERSET_H
